<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <title>继承简单实例</title>
    <style>
    .alert {
        border: 1px solid black;
        padding: 10px;
        margin: 10px;
    }
    </style>
</head>

<body>
    来源于<em>http://sandbox.runjs.cn/show/ddlp7nlt</em>
    <div class="alert">这里是alert框</div>
    <div class="alert">
        <h2>我是标题</h2>这里是带标题alert框</div>
    <div class="alert">
        <h2>我是标题和按钮的alert</h2>这里是带标题alert框
        <input type="button" value="点击我">
    </div>
    <script src="./js/jquery.js"></script>
    <script type="text/javascript">
    var arr = [];
    var slice = arr.slice;

    function create() {
        if (arguments.length == 0 || arguments.length > 2) {
            throw '参数错误';
        }
        var parent = null;
        //将参数转换为数组
        console.log(slice.call({a:1}));
        var properties = slice.call(arguments);
        console.log(properties);

    }

    create(1,2);
    </script>
</body>

</html>
